<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <video src="./img/oceans-clip.mp4" controls></video>
    <button>播放</button>
    <button>暂停</button>
    <button>重新加载</button>
    <button>快进</button>
    <script>
        window.onload = function(){
            let video = document.querySelector("video"); // {}
            let btn1 = document.querySelectorAll("button")[0]; //[{},{},{}]
            let btn2 = document.querySelectorAll("button")[1];
            let btn3 = document.querySelectorAll("button")[2];
            let btn4 = document.querySelectorAll("button")[3];

            // play() 播放  pause()暂停 load()重新加载
            btn1.onclick = function(){
                video.play() //播放
            }
            btn2.onclick = function(){
                video.pause() //暂停
            }
            btn3.onclick = function(){
                video.load() // 重新加载
            }
            btn4.onclick = function(){
                video.currentTime+=10   // 当前播放时间
                video.play() //播放
            }
        }
    </script>
</body>
</html>